<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据上传 - 稳定匹配可视化系统</title>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/upload.css">
</head>
<body>
    <!-- 顶部导航栏 -->
    <header class="navbar">
        <div class="container">
            <h1 class="logo">稳定匹配可视化系统</h1>
            <nav class="nav-menu">
                <ul>
                    <li><a href="index.html">首页</a></li>
                    <li><a href="results.html">匹配结果</a></li>
                    <li><a href="process.html">匹配过程</a></li>
                    <li><a href="upload.html" class="active">数据上传</a></li>
                    <li><a href="execute.html">算法执行</a></li>
                </ul>
            </nav>
        </div>
    </header>

    <!-- 主要内容区域 -->
    <main class="main-content">
        <div class="container">
            <h2>数据上传</h2>
            
            <!-- 数据上传表单 -->
            <section class="upload-section">
                <h3>上传数据文件</h3>
                <form id="upload-form" enctype="multipart/form-data">
                    <div class="form-group">
                        <label for="file-type">文件类型:</label>
                        <select id="file-type" name="file_type" required>
                            <option value="">请选择文件类型</option>
                            <option value="shipment">货物数据</option>
                            <option value="route">路线数据</option>
                            <option value="network">网络数据</option>
                            <option value="cooperation">合作参数</option>
                            <option value="results">结果数据</option>
                        </select>
                    </div>
                    
                    <div class="form-group">
                        <label for="data-file">选择文件:</label>
                        <input type="file" id="data-file" name="file" accept=".csv" required>
                    </div>
                    
                    <button type="submit" class="btn btn-primary">上传文件</button>
                </form>
                
                <div id="upload-status" class="upload-status hidden">
                    <p>正在上传...</p>
                </div>
            </section>

            <!-- 已上传数据信息 -->
            <section class="uploaded-data">
                <h3>已上传数据</h3>
                <div id="data-info">
                    <p>正在加载已上传数据信息...</p>
                </div>
            </section>

            <!-- 数据清除 -->
            <section class="data-clear">
                <h3>数据管理</h3>
                <button id="clear-data" class="btn btn-secondary">清除所有数据</button>
                <p class="warning">注意：此操作将清除所有已上传的数据和缓存</p>
            </section>
        </div>
    </main>

    <!-- 底部信息栏 -->
    <footer class="footer">
        <div class="container">
            <p>&copy; 2025 稳定匹配可视化系统. All rights reserved.</p>
        </div>
    </footer>

    <script src="js/main.js"></script>
    <script src="js/upload.js"></script>
</body>
</html>